﻿using UIOC.Attributes;

namespace UIOC.Observable.Tests.Models {

    public interface IObservableUIOCModel : IObservableModel {

        IObservableInt Int { get; }
    }

    public interface IUIOCModel : IModel, IObservableUIOCModel {

    }

    [Implement(typeof(IUIOCModel))]
    public partial class UIOCModel : Model, IUIOCModel {

        [Autowired]
        private IInt m_Int;
        public IObservableInt Int => m_Int;

        [Autowired]
        private IShort m_Short;
    }

    public interface  IObservableUIOCInt : IObservableInt {
    }

    public interface IUIOCInt : IInt, IObservableUIOCInt { 
    }

    [Implement(typeof(IUIOCInt))]
    public partial class UIOCInt : Int, IUIOCInt {
    }

    public interface IObservableUIOCModel2 : IObservableUIOCModel {

        new IObservableUIOCInt Int { get; }
    }

    public interface IUIOCModel2 : IUIOCModel, IObservableUIOCModel2 {
    }

    [Implement(typeof(IUIOCModel2))]
    public partial class UIOCModel2 : UIOCModel, IUIOCModel2 {

        [Autowired]
        private IUIOCInt m_Int;
        public new IObservableUIOCInt Int => m_Int;
    }
}
